import { VxeUI } from "vxe-pc-ui";
import EnumValueDownModal from './EnumValueDownModal.vue';
import { BSDataTypeEnum } from "@@/constants/other-keys";

// 创建一个复杂的组合渲染
VxeUI.renderer.add("TypingValueDownModalabb", {
  tableAutoFocus: "input",
  renderTableDefault (renderOpts, params) {
    let garams = renderOpts.abb;
    var renderInner;
    if (garams.row.type === BSDataTypeEnum.Enum) {
      params.row.code = garams.row.code;
      params.row.typeId = garams.row.typeId;
      params.row.typeCode = garams.row.typeCode;
      renderInner = (
        <EnumValueDownModal
          params={params}
          renderOpts={renderOpts}
        ></EnumValueDownModal>
      );
    }
    return [renderInner];
  },
});
